<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
<script type="text/javascript" src="__PUBLIC__/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="__PUBLIC__/easyui/jquery.easyui.min.js"></script>
<script type="text/javascript" src="__PUBLIC__/easyui/locale/easyui-lang-zh_CN.js"></script>
<script type="text/javascript" src="__PUBLIC__/Js/jquery.cookie.js"></script>
<script type="text/javascript" src="__PUBLIC__/Js/jquery.form.min.js"></script>
<import file="Js.mycommon" />
<!--<load href="__PUBLIC__/Js/Util/ImageLoader.js" />-->
<load href="__PUBLIC__/Js/editor/kindeditor-min.js" />
<load href="__PUBLIC__/fancybox2/jquery.fancybox.pack.js" />
<load href="__PUBLIC__/Js/jquery.bgiframe.js" /> 
<!-- <load href="__PUBLIC__/jqtransformplugin/jquery.jqtransform.js" />  -->
<!--[if IE 6]>
<script src="__PUBLIC__/Js/DD_belatedPNG_0.0.8a-min.js" type="text/javascript"></script>
<![endif]-->   
<!-- <load href='__PUBLIC__/Css/style.css' /> -->
<link rel="stylesheet" type="text/css" href="__PUBLIC__/easyui/themes/default/easyui.css">
<link rel="stylesheet" type="text/css" href="__PUBLIC__/easyui/themes/icon.css">
<load href="__PUBLIC__/fancybox2/jquery.fancybox.css" />
<!-- <load href="__PUBLIC__/jqtransformplugin/jqtransform.css" /> -->
<load href="__PUBLIC__/jkp/g.css" />
<title>{$Think.config.showTitle}</title> 
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
        <script src="http://cdn.bootcss.com/html5shiv/3.7.0/html5shiv.min.js"></script>
        <script src="http://cdn.bootcss.com/respond.js/1.3.0/respond.min.js"></script>
    <![endif]-->
<!--[if lt IE 8>
<script type="text/javascript" src="__PUBLIC__/PIE/PIE.js"></script>
<![endif]-->
<script type=text/javascript>
//指定当前组模块URL地址 
var URL 	= '__URL__';
var APP	 	= '__APP__';
var PUBLIC 	= '__PUBLIC__';
var SELF	= '__SELF__';
var editor; //设置为全局变量，用于编辑器的显示与内容的获取。
//var checkFlag = false; //用于判断检查表单是否通过验证
var closeflag = 0;
</script>
<style type="text/css">
.hide{ display:none;}
.hidescroll{ overflow:hidden;}
.alt td{
        background:#ecf6fc;  /*这行将给所有的tr加上背景色*/
} 
.over .tdOver{
        background:#bcd4ec;  /*这个将是鼠标高亮行的背景色*/
		cursor:pointer;
}
.bg_green{background-color:#C8F8A5;}
.selected td{background:#C8F8A5;}
.tLeft{text-align:left}
.tRight{text-align:right}
.tCenter{text-align:center}
.tTop{vertical-align:top}
.tBottom{vertical-align:bottom}
.tMiddle{vertical-align:middle}
.hMargin{margin-left:3px; margin-right:3px}
.vMargin{margin-top:3px; margin-bottom:3px}

.fLeft{float:left}
.fRig{float:right}
.fNone{float:none}
.cBoth{clear:both}

.bold{font-weight:bold}
.normal{font-weight:normal}

.75{width:75%}
.100{width:100%}
.25{width:25%}

.over{background-color:#CFC}
.out{background-color:#FFF}
.down{background-color:#CF9}
.click{background-color:#CC3}
.mycolor{background-color:#CF9}

.space{letter-spacing:4px}

.huge{width:350px}
.large{width:280px}
.medium{width:150px}
.small{width:65px}
.mini{width:35px}
.readonly{filter:alpha(opacity=60)}
#tb_login{font-size: 14px;}
#tb_login td{padding: 2px 30px;}
.input1{
	border: 1px solid #cccccc; width:220px; height:26px; line-height:26px;
}
.input2{
	border: 1px solid #cccccc; width:165px; height:20px; line-height:20px;
}
.input3{
	border: 1px solid #cccccc; width:450px; height:26px; line-height:26px;
}
.input4{
	border: 1px solid #cccccc; width:190px; height:26px; line-height:26px;
}
.quickadd{
	border: 1px solid #cccccc; width:450px; height:26px; line-height:26px;cursor: pointer;
}
#entry a{color:#fff;text-decoration:none}
#entrya:hover{text-decoration:underline}
#entrya:visited{color:#fff;text-decoration:none}
#tb1 th{font-weight: bold;}
#showtitle1{
	display:inline-block;
	font-size: 18px; font-weight: bold;
	margin:10 0 0 20px;
}
.schoolList li{border 1px;float: left; width: 94px; padding: 0px 10px; margin: 2px 2px;}
.schoolhover{text-decoration: underline; cursor: pointer; font-weight: bold; color: #0cc;}
#schoolList5 li{width: 200px;}
</style>
</head>
<body>
<input name="userid" type="hidden" value="{$Think.session.authId}" id="userid"/>
<input name="loginUserName" type="hidden" value="{$Think.session.loginUserName}" id="loginUserName"/>

<!-- 以下代码为本项目专有 -->
<script language="JavaScript">
jQuery.fn.rowspan = function(colIdx) { 
	//封装的一个JQuery小插件
	//传入的参数是对应的列数从0开始，哪一列有相同的内容就输入对应的列数值
	//$(".tb1").rowspan(0);
	return this.each(function(){
	var that;
	$('tr', this).each(function(row) {
	$('td:eq('+colIdx+')', this).filter(':visible').each(function(col) {
	if (that!=null && $(this).html() == $(that).html()) {
	rowspan = $(that).attr("rowSpan");
	if (rowspan == undefined) {
	$(that).attr("rowSpan",1);
	rowspan = $(that).attr("rowSpan"); }
	rowspan = Number(rowspan)+1;
	$(that).attr("rowSpan",rowspan);
	$(this).hide();
	} else {
	that = this;
	}
	});
	});
	});
}
jQuery.fn.selectSchool = function(targetId) {
	var _seft = this;
	var targetId = $(targetId);

	this.click(function(){
		var A_top = $(this).offset().top + $(this).outerHeight(true);  //  1
		var A_left =  $(this).offset().left;
		targetId.bgiframe();
		targetId.show().css({"position":"absolute","top":A_top+"px" ,"left":A_left+"px","z-index":9999});
	});

	targetId.find("#selectItemClose").click(function(){
		targetId.hide();
	});

	$(document).click(function(event){
		if(event.target.id!=_seft.selector.substring(1)){
			targetId.hide();	
		}
	});

	targetId.click(function(e){
		e.stopPropagation(); //  2
	});

    return this;
}
$(function(){
	$('#a_login').click(function(event) {
		$('#w_login').window('open');
	});
	$('#w_login').window({
	    collapsible:false,minimizable:false,maximizable:false,resizable:false,draggable:false
    });
	$('.changestyle').click(function(event) {
		$('html').css("background","#549503 url(__PUBLIC__/jkp/"+ $(this).data('bg') +") repeat top");
		$.cookie('bgjpg', $(this).data('bg'),{expires: 365, path: '/' });
	});
	if($.cookie('bgjpg')!=null){
		$('html').css("background","#549503 url(__PUBLIC__/jkp/"+ $.cookie('bgjpg') +") repeat top");
	}
	//用cookie自动登录
	if($('#userid').val()=="" && $.cookie('jkpuserName')!=null && $.cookie('jkpuserPass')!=null){
		$.post('__APP__/Public/checkLogin/', {account:$.cookie('jkpuserName'),password:$.cookie('jkpuserPass'),saveCookie:1,ajax:1}, function(data) {
			if(data.status){
				window.location = '__URL__';
			}
		});
	}
	$('#a_logout').click(function(event) {
		$.cookie('jkpuserName', null,{ path: '/jkp/' });
		$.cookie('jkpuserPass', null,{ path: '/jkp/' });
		window.location = '__APP__/Public/logout/';
	});
	//学校列表tabs
	var tabs = $('#schoolList').tabs().tabs('tabs');
		for(var i=0; i<tabs.length; i++){
		tabs[i].panel('options').tab.unbind().bind('mouseenter',{index:i},function(e){
		$('#schoolList').tabs('select', e.data.index);
		});
	}
	var schoolJson = <present name="schoolJson">{$schoolJson}<else />""</present>//{$schoolJson};
	for(var i=0;i<schoolJson.length;i++){
		if(schoolJson[i].sType=="公办中学"){
			$('#schoolList1').append("<li>"+schoolJson[i].sName+"</li>");
		}else if(schoolJson[i].sType=="公办小学"){
			$('#schoolList2').append("<li>"+schoolJson[i].sName+"</li>");
		}else if(schoolJson[i].sType=="民办学校"){
			$('#schoolList4').append("<li>"+schoolJson[i].sName+"</li>");
		}else{
			$('#schoolList3').append("<li>"+schoolJson[i].sName+"</li>");
		}
	}
	$('#schoolList li').hover(function() {
		$(this).addClass('schoolhover');
	}, function() {
		$(this).removeClass('schoolhover');
	});
	$('.closeSL').click(function(event) {
		$('#schoolList').hide();
	});

	//用颜色标出自己的行程
	//var temp1 = {$Think.session.authId}
	//alert(0)
	$('.u'<present name="Think.session.authId">+{$Think.session.authId}</present>).css('background-color','#ffe0b8');

	//$("#address").selectSchool('#schoolList');
	//保存导出Excel//model模块名/title显示标题/eType输出文件类型Excel5,Excel2007/fieldString输出字段列表/titleString输出字段标题列表
	$('.outExcel').click(function(event) {
		$('#showExcelDiv').dialog({
			onOpen:function(){
				$('html').addClass('hidescroll');},
			onClose:function(){
				$('html').removeClass('hidescroll');},
			modal:true,title:"导出电子表格对话框",width:'95%',height:'95%',resizable:true,
			buttons:[{
				text:'保存',iconCls:'icon-ok',
				handler:function(){
					var allowuserstring = "-,毕东宁,吴希华,-"
					if(allowuserstring.indexOf(','+$('#loginUserName').val()+',')<1){
						$('#showExcelDiv').dialog('close');
						$.messager.show({title:'提示信息',msg:"没有导出权限",timeout:2000,showType:'slide'});
						return false;
					}
					var m		= $('#modelName').val();
					var f		= $('#form2 input:checked[type=checkbox]');
					var title	= $('#e_title').val();
					var eType	= $('input:checked[name=eType]').val();
					var fieldString='',titleString='';
					var l		= $('#begineLine').val();//数据从第几行开始显示数据，默认为第三行，（第一行标题，第二行字段）
					l = l>0?l:3;
					jQuery.each(f, function(i, field){
						v	= field.value;//取得所有要显示的字段名列表
						t	= $('#t_'+v).val();//取得所有要显示的显示标题列表
						fieldString += v+',';
						titleString += t+',';
					});
					fieldString=fieldString.substring(0,fieldString.length-1);
					titleString=titleString.substring(0,titleString.length-1); 
					url = URL+"/saveExcel/model/"+ m +"/bl/"+ l +"/title/"+encodeURI(title)+"/eType/"+eType+"/fieldString/"+fieldString+"/titleString/"+titleString;
					goUrl(url);return false;
				}//handler
			},{
				text:'关闭',handler:function(){
					$('#showExcelDiv').dialog('close');
				}
			}]
		});	
	});//outexcel
});

function close_window(){
	$('#w1,#w_login').window('close');
}
function submit_login(){
	$('#backUrl').val(SELF);
	var account 	= $("#account").val();
	var password 	= $("#password").val();
	var saveCookie;
	if($("#saveCookie").attr("checked") == false){
		saveCookie = 0;
	}else{
		saveCookie = 1;
	}
	$.post('__APP__/Public/checkLogin/', {account:account,password:password,saveCookie:saveCookie,ajax:1}, function(data) {
		if(saveCookie && data.status){
			$.cookie('jkpuserName', account,{expires: 365,path: '/jkp/'});
			$.cookie('jkpuserPass', password,{expires: 365,path: '/jkp/'});
		}
		//window.location = '__URL__';
		backUrl();
	});
}
 </script>
<!--[if IE 6]>
<script src="__PUBLIC__/Js/DD_belatedPNG_0.0.8a-min.js" type="text/javascript"></script>
<![endif]--> 
<div class="hide" id="hideDiv"></div><div class="hide" id="hideImage"></div>
<div class="hide">
	<div id="w_login" class="easyui-window" title="登录" iconCls="icon-adim" style="width:350px;height:260px;padding:5px;" closed="true">
		<div class="easyui-layout" fit="true">
			<div region="center" border="false" style="padding:10px;background:#fff;border:1px solid #ccc;" id='list4'>
				<table name="tb_login" id="tb_login">
					<tr><td>用户名：</td></tr>
					<tr>
						<td><input type="text" class="input1" check="Require" warning="请输入帐号" name="account" id="account" /></td>
					</tr>
					<tr><td>密&nbsp;&nbsp;&nbsp;&nbsp;码：</td></tr>
					<tr>
						<td><input type="password" class="input1" check="Require" warning="请输入密码" name="password" id="password" /></td>
					</tr>
					<tr>
						<td>记住我的登录状态<input name="saveCookie" type="checkbox" value="" id="saveCookie" /><input type="hidden" name="ajax" value="1" /></td>
					</tr>
				</table>	
			</div>
			<div region="south" border="false" style="text-align:right;padding:5px 0; height:35px">
				<a class="easyui-linkbutton" iconCls="icon-ok" href="javascript:void(0)" onclick="submit_login()">确认</a>
				<a class="easyui-linkbutton" iconCls="icon-cancel" href="javascript:void(0)" onclick="close_window()">关闭</a>
			</div>
		</div>
	</div>
</div>
<!-- 学校列表信息 -->
<div id="schoolList" class="hide easyui-tabs" style="width:500px;height:auto">
	<div title="公办中学" style="padding:10px" id="schoolList1" class="schoolList"></div>
	<div title="公办小学" style="padding:10px" id="schoolList2" class="schoolList"></div>
	<div title="民办学校" style="padding:10px" id="schoolList4" class="schoolList"></div>
	<div title="教科培中心" style="padding:10px" id="schoolList5" class="schoolList">
		<li>教科培中心-一楼电教室</li><LI>教科培中心-教学楼204</LI><li>教科培中心-综合楼三楼大会议室</li><li>教科培中心-综合楼三楼小会议室</li><li>教科培中心-其他教室</li>
	</div>
	<div title="其他" style="padding:10px" id="schoolList3" class="schoolList">
		<li>请假</li>
	</div>
	<span style="float:right;width:25px;position:absolute;top:5px;left:465px;"><a href="#" class='closeSL'>关闭</a></span>
</div>
<!-- 通用头部信息 -->
<div class="header">
	<p class="logo">
		<a href="#" title="珠海市香洲区教科培中心" data-ca="header-logo">珠海市香洲区教科培中心</a>
	</p>
	<ul id="entry">
		<present name="userName">
			欢迎你,{$userName}
		<else />
			<a class="easyui-linkbutton" href="#" id="a_login" data-options="plain:true,iconCls:'icon-adim'">登录</a>
		</present>
		<a href="#" class="easyui-menubutton" data-options="plain:true,menu:'#mm1',iconCls:'icon-style'">风格</a>
		<a class="easyui-linkbutton" href="#" data-options="plain:true,iconCls:'icon-cog'">设置</a>
		<a class="easyui-linkbutton" href="#" data-options="plain:true,iconCls:'icon-redo'" id="a_logout">退出</a>
		<div id="mm1" style="width:50px; minWidth:30px;">
			<div data-options="iconCls:'icon-num1'" class="changestyle" data-bg="1.jpg">风格一</div>
			<div data-options="iconCls:'icon-num2'" class="changestyle" data-bg="9.jpg">风格二</div>
			<div data-options="iconCls:'icon-num3'" class="changestyle" data-bg="5.jpg">风格三</div>
			<div data-options="iconCls:'icon-num3'" class="changestyle" data-bg="2.jpg">风格四</div>
		</div>
	</ul>
</div>